package com.iplant.basic.service.basicenum.bfc;

import com.iplant.base.po.enums.BaseEnum;

public enum BFCAuthCompares implements BaseEnum {




    Default (0,"默认MD5"),
    /**
     * File MD5
     */
    MD5(    0b000001,"MD5"),
    /**
     * CPU No
     */
    CPU(    0b0000010,"CPU"),
    /**
     * Board No
     */
    Board(    0b0000100,"Board"),
    /**
     * Disk No
     */
    Disk(    0b0001000,"Disk"),
    /**
     * Mac No
     */
    Mac(    0b0010000,"Mac"),

    /**
     *  IP Address
     */
    IP(    0b0100000,"IP"),

    /**
     * Server Name
     */
    Server(    0b1000000,"Server");

    private int value;
    private String label;
    private String remark = "";

    BFCAuthCompares(int value, String label) {
        this.value = value;
        this.label = label;
    }
    BFCAuthCompares(int value, String label, String remark) {
        this.value = value;
        this.label = label;
        this.remark = remark;
    }

    public static BFCAuthCompares getEnumType(int val) {
        for (BFCAuthCompares type : BFCAuthCompares.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return null;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
